<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>微任务</title>
</head>
<body>
    <script>
        console.log('start');
        queueMicrotask(() => {
            // DOM 更新了 但不是渲染完了
            // offsetHeight scrollTop getBoundingClientRect
            // 立即重绘重排 耗性能
            console.log('微任务');
        })
        console.log('end');
    </script>
</body>
</html>